home *** CD-ROM | disk | FTP | other *** search
/ InterNet Essentials for Pharmacists / InterNet Essentials for Pharmacists.iso / InterNet.exe / InterNet.dxr / 00023_VideoButton.ls < prev    next >
Encoding:
Text File  |  2000-11-16  |  1.9 KB  |  61 lines

  1. property spriteNum
  2.  
  3. on mouseWithin me
  4.   nameOfSprite = (the member of sprite spriteNum).name
  5.   howLong = nameOfSprite.length
  6.   if chars(nameOfSprite, howLong - 4, howLong) = " norm" then
  7.     WhoToPutHere = chars(nameOfSprite, 1, howLong - 4) & "over"
  8.     sprite(spriteNum).member = member(WhoToPutHere)
  9.     cursor(200)
  10.     if sprite(50).visible = 0 then
  11.       sprite(50).visible = 1
  12.     end if
  13.   end if
  14.   sprite(50).locH = the mouseH
  15.   sprite(50).locV = the mouseV
  16.   updateStage()
  17. end
  18.  
  19. on mouseDown me
  20.   nameOfSprite = (the member of sprite spriteNum).name
  21.   howLong = nameOfSprite.length
  22.   if chars(nameOfSprite, howLong - 4, howLong) = " over" then
  23.     nameOfSprite = (the member of sprite spriteNum).name
  24.     howLong = nameOfSprite.length
  25.     WhoToPutHere = chars(nameOfSprite, 1, howLong - 4) & "down"
  26.     sprite(spriteNum).member = member(WhoToPutHere)
  27.     set the member of sprite 50 to member("handDown")
  28.     updateStage()
  29.   end if
  30. end
  31.  
  32. on mouseUp me
  33.   nameOfSprite = (the member of sprite spriteNum).name
  34.   howLong = nameOfSprite.length
  35.   if chars(nameOfSprite, howLong - 4, howLong) = " down" then
  36.     nameOfSprite = (the member of sprite spriteNum).name
  37.     howLong = nameOfSprite.length
  38.     WhoToPutHere = chars(nameOfSprite, 1, howLong - 4) & "over"
  39.     sprite(spriteNum).member = member(WhoToPutHere)
  40.     sprite(50).visible = 0
  41.     set the member of sprite 50 to member("hand")
  42.     cursor(-1)
  43.     updateStage()
  44.   end if
  45. end
  46.  
  47. on mouseLeave me
  48.   nameOfSprite = (the member of sprite spriteNum).name
  49.   howLong = nameOfSprite.length
  50.   if (chars(nameOfSprite, howLong - 4, howLong) = " over") or (chars(nameOfSprite, howLong - 4, howLong) = " down") then
  51.     nameOfSprite = (the member of sprite spriteNum).name
  52.     howLong = nameOfSprite.length
  53.     WhoToPutHere = chars(nameOfSprite, 1, howLong - 4) & "norm"
  54.     sprite(spriteNum).member = member(WhoToPutHere)
  55.     sprite(50).visible = 0
  56.     set the member of sprite 50 to member("hand")
  57.     cursor(-1)
  58.     updateStage()
  59.   end if
  60. end
  61.